<?php
/*------------------------------------------------------------------------
# com_vportfolio - Vportfolio component
# ------------------------------------------------------------------------
# author    Vsmart Extensions
# copyright Copyright (C) 2010 www.vsmart-extensions.com. All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://www.vsmart-extensions.com
# Technical Support:  Forum - http://www.vsmart-extensions.com
-------------------------------------------------------------------------*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.application.component.view' );

/**
 * @package Joomla
 * @subpackage Vportfolio
 */
class vportfolioConfigComponentView extends JView
{
	/**
	 * Display the view
	 */
	function display($config)
	{
		// load the component's language file
		//DEVNOTE: load component language. Print language name on thr last line.
		//
		$lang = & JFactory::getLanguage();
		$lang->load(JRequest::getVar( 'component' ));
		
		//DEVNOTE: set document title
		$document = & JFactory::getDocument();
		$document->setTitle( JText::_('VPortfolio Component') );
    
    //DEVNOTE: Print Hellpworld and language name
		?><BR> <H1><?php echo JText::_('PORTFOLIO CONFIGURATION');?></H1>
        <form action="index.php" method="post" name="adminForm" autocomplete="off">
		<fieldset class="adminform">
		<legend><?php echo JText::_( 'Show options' ); ?></legend>
			<table class="admintable" cellspacing="1">
            	<tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Show url' ); ?>
						</label>
					</td>
					<td width="200">
                    	<input type="radio" name="cf_url"  value="1" <?php if($config[0]->value == 1) echo "checked"; ?>  />
						<label for="cf_url">Yes</label>
						<input type="radio" name="cf_url"  value="0"  <?php if($config[0]->value == 0) echo "checked"; ?> />
						<label for="cf_url">No</label>
					</td>
                    <td>
                    	<?php echo $config[0]->description; ?>
                    </td>
				</tr>
                <tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Show reviews' ); ?>
						</label>
					</td>
					<td>
                    	<input type="radio" name="cf_review"  value="1" <?php if($config[1]->value == 1) echo "checked"; ?>  />
						<label for="cf_review">Yes</label>
						<input type="radio" name="cf_review"  value="0"  <?php if($config[1]->value == 0) echo "checked"; ?> />
						<label for="cf_review">No</label>
					</td>
                    <td>
                    	<?php echo $config[1]->description; ?>
                    </td>
				</tr>
                <tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Show page heading' ); ?>
						</label>
					</td>
					<td>
                    	<input type="text" value="<?php echo $config[7]->value;?>" class="inputbox" size="30" name="cf_heading"/>
					</td>
                    <td>
                    	<?php echo $config[7]->description; ?>
                    </td>
				</tr>
                <tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Show category description' ); ?>
						</label>
					</td>
					<td>
                        <input type="radio" name="cf_category_des"  value="1" <?php if($config[8]->value == 1) echo "checked"; ?>  />
						<label for="cf_category_des">Yes</label>
						<input type="radio" name="cf_category_des"  value="0"  <?php if($config[8]->value == 0) echo "checked"; ?> />
						<label for="cf_category_des">No</label>
					</td>
                    <td>
                    	<?php echo $config[8]->description; ?>
                    </td>
				</tr>
				
				<tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Click to thumb image' ); ?>
						</label>
					</td>
					<td>
                        <input type="radio" name="cf_click_to_thumb_image"  value="1" <?php if($config[11]->value == 1) echo "checked"; ?>  />
						<label for="cf_click_to_thumb_image">Slide Box</label>
						<input type="radio" name="cf_click_to_thumb_image"  value="0"  <?php if($config[11]->value == 0) echo "checked"; ?> />
						<label for="cf_click_to_thumb_image">Item Detail</label>
					</td>
                    <td>
                    	<?php echo $config[11]->description; ?>
                    </td>
				</tr>
				
                <tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Contact link' ); ?>
						</label>
					</td>
					<td>
                        <input type="text" value="<?php echo $config[9]->value;?>" class="inputbox" size="30" name="cf_contact_link"/>
					</td>
                    <td>
                    	<?php echo $config[9]->description; ?>
                    </td>
				</tr>
                </table>
                </fieldset>
            <fieldset class="adminform">
            <legend><?php echo JText::_( 'Extra fields' ); ?></legend>
            <table class="admintable" cellspacing="1">
                <tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Show extra fields' ); ?>
						</label>
					</td>
					<td width="200">
                    	<input type="radio" name="cf_extra"  value="1" <?php if($config[2]->value == 1) echo "checked"; ?>  />
						<label for="cf_extra">Yes</label>
						<input type="radio" name="cf_extra"  value="0"  <?php if($config[2]->value == 0) echo "checked"; ?> />
						<label for="cf_extra">No</label>
					</td>
                    <td>
                    	<?php echo $config[2]->description; ?>
                    </td>
				</tr>
                <tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Define type' ); ?>
						</label>
					</td>
					<td>
                        <textarea name="cf_type" rows="4" cols="20"><?php echo $config[6]->value; ?></textarea>
					</td>
                    <td>
                    	<?php echo $config[6]->description; ?>
                    </td>
				</tr>
            </table>
        </fieldset>
        <fieldset class="adminform">
		<legend><?php echo JText::_( 'User options' ); ?></legend>
			<table class="admintable" cellspacing="1">
            	<tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Allow review' ); ?>
						</label>
					</td>
					<td width="200">
                    	<input type="radio" name="cf_allow_review"  value="1" <?php if($config[4]->value == 1) echo "checked"; ?>  />
						<label for="cf_url">Yes</label>
						<input type="radio" name="cf_allow_review"  value="0"  <?php if($config[4]->value == 0) echo "checked"; ?> />
						<label for="cf_url">No</label>
					</td>
                    <td>
                    	<?php echo $config[4]->description; ?>
                    </td>
				</tr>
                <tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Auto public review' ); ?>
						</label>
					</td>
					<td width="200">
                    	<input type="radio" name="cf_allow_review_auto"  value="1" <?php if($config[10]->value == 1) echo "checked"; ?>  />
						<label for="cf_url">Yes</label>
						<input type="radio" name="cf_allow_review_auto"  value="0"  <?php if($config[10]->value == 0) echo "checked"; ?> />
						<label for="cf_url">No</label>
					</td>
                    <td>
                    	<?php echo $config[10]->description; ?>
                    </td>
				</tr>
                <tr>
					<td width="150" class="key">
						<label for="public">
							<?php echo JText::_( 'Allow rating' ); ?>
						</label>
					</td>
					<td>
                    	<input type="radio" name="cf_allow_rating"  value="1" <?php if($config[5]->value == 1) echo "checked"; ?>  />
						<label for="cf_review">Yes</label>
						<input type="radio" name="cf_allow_rating"  value="0"  <?php if($config[5]->value == 0) echo "checked"; ?> />
						<label for="cf_review">No</label>
					</td>
                    <td>
                    	<?php echo $config[5]->description; ?>
                    </td>
				</tr>
            </table>
        </fieldset>
    

        <input type="hidden" name="option" value="com_vportfolio" />
        <input type="hidden" name="controller" value="config" />
        <input type="hidden" name="task" value="" />
        <?php echo JHTML::_( 'form.token' ); ?>
	</form>
        
<?php 
  }
}
?>
